﻿@using Framework.Util.Helpers
@model IEnumerable<Project.Domain.Entities.Deposit> 
<div class="content_table">
    <table cellspacing="0" cellpadding="0" border="0" width="100%">
        <tr>
            <th class="th_no_cursor" width="40">No.</th>                        
            <th class="th_left" ><div id="title" class="sort icon_no_sort">Amount</div></th>
            <th class="th_left" "><div id="title" class="sort icon_no_sort">Batch</div></th>            
            <th class="th_last" width="100"><div id="created" class="sort icon_sort_asc">Created</div></th>
        </tr>
        @{
            var start=Convert.ToInt32(ViewBag.start);
            if (Convert.ToInt32(ViewBag.result)>0)
            {
                var i = 0;
                var count = 0;
                foreach (var dp in Model)
                {
                    count = count + 1;
                    var classCss = "item_row" + i.ToString();
                    var idItem = "item" + i.ToString();
                    var loadStatusID = "loadStatusID_" + dp.DepositId;
                    <tr class="@classCss @(i%2 == 0 ? Html.Raw("row1") : Html.Raw("row2"))">					
                        <td class="td_center">@(count + start)</td>                                                
                        <td class="th_left">
                            <span class="text">$@Html.Slip(dp.Amount.ToString())</span>
                        </td>
                        <td class="th_left">
                            <span class="text">@dp.Batch</span>
                        </td>                       
                        <td class="th_last td_center">
                            @string.Format("{0:dd-MM-yyyy}", dp.CreatedTime)
                        </td>
                    </tr>
                    i += 1;                    
                }

            }
            else
            {
                <tr class="row1">
                    <td class="th_last td_center" colspan="50" style="font-size: 20px; padding: 50px 0">No data</td>
                </tr>
            }
        }
    </table>
</div>
<div class="footer_table">
    <div class="item_per_page">Items per page:</div>            
    <div id="phantrang_clip" style="width: 200px; float: left;margin: 8px 5px 0 10px;">
        <div style="float:left;margin-bottom: 5px;">
            @Html.Raw((Html.Pager((MvcContrib.Pagination.IPagination)Model).Format("").SingleFormat("").First("First").Last("Last").Next("").Previous("")).ToString())
        </div>
        <div class="ClearAll"></div>
    </div>    
</div>